package com.example.accessingdatamapper;

import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author caiwl
 * @date 2020/12/24 9:34
 */
public interface CustomerMapper extends Mapper<Customer> {
    default List<Customer> selectByLastName(String lastName) {
        Example example = new Example(Customer.class);
        example.createCriteria().andEqualTo("lastName", lastName);
        return selectByExample(example);
    }
}
